<template>
	<view class="" style="margin: 20rpx;">

		<uni-fab ref="fab" :pattern="pattern" :content="content" horizontal="right" vertical="bottom"
			@fabClick="addStoreBtnAction" />

		<view
			style="border: 1px solid #e5e5e5; background-color: white; z-index: 2;  position: sticky;left: 0;right: 0;top: 0; height: 430rpx;">
			<view class="example-body" style="font-size: 10px; display: flex; align-items: center;">
				<div style="padding: 5px;">入库</div>
				<uni-datetime-picker type="daterange" @change="changeAction" @maskClick="maskClick" />
			</view>
			<view class="example-body" style="font-size: 10px; display: flex; align-items: center;">
				<div style="padding: 5px;">出库</div>
				<uni-datetime-picker type="daterange1" @change="changeAction1" @maskClick="maskClick1" />
			</view>
			<view class=""
				style="background-color: white;  height: 100rpx; display: flex;align-items: center; text-align: center;">

				<view class="" style="margin-left: 20rpx; flex: 1;">
					<uni-data-select v-model="X" :localdata="rangeX" @change="changeX" :clear="false"></uni-data-select>
				</view>
				<view class="" style="margin-left: 10rpx; flex: 1;">
					<uni-data-select v-model="Y" :localdata="rangeY" @change="changeY" :clear="false"></uni-data-select>
				</view>
				<view class="" style=" margin-left: 10rpx; flex: 1;">
					<uni-data-select v-model="Z" :localdata="rangeZ" @change="changeZ" :clear="false"></uni-data-select>
				</view>
				<view class="" style="flex: 1;" @click="orderExcelAction">
					<button type="primary" size="mini">打印</button>
				</view>

			</view>


			<view class=""
				style="border: 1px solid #e5e5e5; background-color: white; height: 120rpx; display: flex;align-items: center;justify-content: space-between;">
				<view @click="saomaAction1" class=""
					style="line-height: 60rpx; height: 60rpx; width: 60rpx; margin: 0 10rpx;">
					<uni-icons style=" color: #666;" type="scan" size="30"></uni-icons>
				</view>
				<uni-search-bar style="flex: 1; line-height: 60rpx; height: 60rp" @confirm="search" placeholder="请输入串码"
					:focus="false" v-model="searchValue" @blur="blur" @input="input" @cancel="cancel" @clear="clear">
				</uni-search-bar>
			</view>

		</view>
		<view @click="fuzhiUrl" v-if="url != ''" class=""
			style="background-color: #fff; padding: 20rpx; margin: 10rpx 0; font-size: 24rpx; color: #007aff;">
			<view class="element">
				{{"发货单"+ url}}
			</view>
		</view>

		<view class="">
			<view class="item" v-for="(item, index) in list">

				<view style="display: flex; justify-content: space-between; align-items: center; font-weight: 700;"
					class="">

					<view class="" style="flex: 1; margin-left: 10rpx;">
						<view class="" style="font-size: 26rpx; display: flex; justify-content: space-between;">
							<view class="">
								<text>{{item.yname}}</text>
							<!-- 	<text v-if="item.fname">/</text>
								<text v-if="item.fname">{{item.fname}}</text> -->
							</view>
							<view class="">
								<text v-if="item.status == 1"
									style="color: #007aff; margin-left: 10rpx; font-size: 700;">未出库</text>
								<text v-if="item.status == 2"
									style="color: #f00; margin-left: 10rpx; font-size: 700;">已出库</text>
							</view>
						</view>
						<view class="" style="font-size: 26rpx;">
							<text>登记人:</text>
							<text style="color: #007aff; margin-left: 10rpx; font-size: 700;">{{item.uname}}</text>
						</view>
						<view class="" style="font-size: 26rpx;">
							<text>串码:</text>
							<text style="color: #007aff; margin-left: 10rpx; font-size: 700;">{{item.number}}</text>
						</view>
						<view class="" style="font-size: 26rpx;">
							<text>入库时间:</text>
							<text style="margin-left: 10rpx; color: #007aff;">{{item.create_time}}</text>
						</view>
						<view class="" style="font-size: 26rpx;">
							<text>R备注:</text>
							<text style="margin-left: 10rpx; color: #007aff;">{{item.rremark != null ? item.rremark : '没填写备注信息' }}</text>
						</view>
						<view v-if="item.status == 2" class="">
							<view class="" style="font-size: 26rpx;">
								<text>出库人:</text>
								<text style="margin-left: 10rpx;color: #007aff; ">{{item.cname}}</text>
							</view>
							<view class="" style="font-size: 26rpx;">
								<text>账号:</text>
								<text style="margin-left: 10rpx; color: #007aff;">{{item.account != null ?item.account :'没填写账号'}}</text>
							</view>
							<view class="" style="font-size: 26rpx;">
								<text>出库时间:</text>
								<text style="margin-left: 10rpx;color: #007aff;">{{item.update_time}}</text>
							</view>

							<view class="" style="font-size: 26rpx;">
								<text>备注:</text>
								<text style="margin-left: 10rpx; color: #007aff;">{{item.remark != null ? item.remark : '没填写备注信息'}}</text>
							</view>
						</view>
					</view>
				</view>
				<view class="" style="display: flex; flex-wrap: wrap;">
					<view class="" v-for="itemImage in item.images" class="image1"
						v-if="item.image != '' && item.image != null">
						<image @click.stop="seebigImageAction(itemImage)" :data-index="index" :src="itemImage + '?imageslim/zlevel/9'"
							mode="widthFix" style="width: 120rpx; height: 120rpx;"></image>
					</view>

					<image class="image2" v-if="item.cimage != '' && item.cimage != null"
						@click.stop="seebigCImageAction(item.cimage)" :data-index="index" :src="item.cimage + '?imageslim/zlevel/9'"
						mode="widthFix" style="width: 120rpx; height: 120rpx;"></image>
				</view>
				<view class="" style="background-color: #e5e5e5;padding: 1rpx; margin-top: 20rpx;">

				</view>

				<view class="" style="display: flex;align-items: center;  margin-top: 20rpx;">
					<button :data-index="index" @click="shaunchuBtnAction" type="warn" size="mini">删除</button>

					<button v-if="item.status == 1" type="primary" size="mini" :data-index="index"
						@click="bianjiBtnAction">修改</button>
					<button v-else type="primary" size="mini" :data-index="index" @click="chukuBtnAction">修改</button>

					<button v-if="item.status == 1" type="primary" size="mini" :data-index="index"
						@click="chukuBtnAction">出库</button>

				</view>

			</view>
		</view>
		<view>
			<uni-popup ref="xiajiaalertDialog" type="dialog">
				<uni-popup-dialog type="warn" cancelText="取消" confirmText="确定" title="提示" content="确定下架此商品"
					@confirm="xiajiadialogConfirm" @close="dialogClose"></uni-popup-dialog>
			</uni-popup>
		</view>

		<view>
			<uni-popup ref="alertDialog" type="dialog">
				<uni-popup-dialog type="warn" cancelText="取消" confirmText="确定" title="提示" content="确定删除吗"
					@confirm="dialogConfirm" @close="dialogClose"></uni-popup-dialog>
			</uni-popup>
		</view>


		<view class="" style="z-index: 10000;">
			<uni-popup ref="inputDialog" type="dialog">
				<uni-popup-dialog ref="inputClose" mode="input" :title="status == false? '入库':'修改'" value=""
					@confirm="buttonAction">

					<view class="" style="width: 100%; font-size: 28rpx;">

						<view class="" style="width: 100%;">
							<view class="">
								<view class="title-left">
									登记人:{{userinfo.store + " / " + userinfo.name}}
								</view>
							</view>
							<view class="">
								<view class="title-left">
									设备类型
								</view>
								<view class="">
									<uni-data-select v-model="value" :localdata="range" @change="change"
										:clear="false"></uni-data-select>
								</view>
							</view>
							<!-- <view class="">
								<view class="title-left">
									设备型号
								</view>
								<view class="">
									<uni-data-select v-model="value1" :localdata="range1" @change="change1"
										:clear="false"></uni-data-select>
								</view>
							</view> -->
							<view class="">
								<view class="title-left">
									设备串码
								</view>
								<view class=""
									style="width: 100%; display: flex; align-items: center; justify-content: space-between;">
									<view class=""
										style="flex: 1; border-radius: 6rpx; border: 2px solid #e5e5e5; width: 100%; padding: 10rpx;">
										<input type="text" name="" id="" v-model="data.number">

									</view>
									<view @click="saomaAction" class="" style="width: 100rpx;">
										<uni-icons style="color: #666; margin-left: 20rpx;" type="scan"
											size="30"></uni-icons>
									</view>
								</view>
							</view>
						</view>

						<view class="">
							<view class="" style="display: flex;align-items: center;">
								<view class="title-left">
									商品图片
								</view>
								<view class="" @click="chooseImage">
									<uni-icons type="plusempty" size="30"
										style="text-align: center; width: 120rpx; height: 120rpx;"></uni-icons>
								</view>
							</view>
							<view class="" style="display: flex;flex-wrap: wrap;">
								<view class="" v-for="(item ,index) in tempImages">
									<view class="" style="position: relative;">
										<view class="" @click="shanchuImage" :data-index="index"
											style="position: absolute; right: 0; top: 0;">
											<uni-icons type="close" size="30"></uni-icons>

										</view>
										<image style="width: 60px; height: 60px;" :src="item" mode=""></image>
									</view>
								</view>
							</view>
						</view>
						<view class="box-border">
							<textarea v-model="data.rremark" style="margin: 20rpx; height: 100rpx;" name="" id=""
								cols="30" rows="10"></textarea>
						</view>
					</view>

				</uni-popup-dialog>

			</uni-popup>
		</view>

		<view class="" style="z-index: 10000;">
			<uni-popup ref="chukuInputDialog" type="dialog">
				<uni-popup-dialog ref="inputClose" mode="input" title="出库" value="" @confirm="chukuAction">

					<view class="" style="width: 100%; font-size: 28rpx;">

						<view class="" style="width: 100%;">
							<view class="">
								<view class="title-left">
									出库人
								</view>
								<view class="box-border">
									<input type="text" placeholder="请输入出库人" v-model="item.cname">
								</view>
							</view>

							<view class="">
								<view class="title-left">
									账号
								</view>
								<view class="box-border">
									<input type="digit" placeholder="请输入账号" v-model="item.account">
								</view>
							</view>
							<view class="">
								<view class="title-left">
									出库照片
								</view>
								<view @click="chukuChooseImage" class=""
									style="display: flex; align-items: center;justify-content: center;">
									<image v-if="chukCurrentImage != ''" :src="chukCurrentImage" mode="widthFix"
										style="width: 120rpx; height: 120rpx;"></image>
									<uni-icons v-else type="plusempty" size="30"
										style="text-align: center; width: 120rpx; height: 120rpx;"></uni-icons>

								</view>

							</view>
							<view class="">
								<view class="title-left">
									备注
								</view>
								<view class="box-border">
									<textarea v-model="item.remark" style="margin: 20rpx; height: 100rpx;" name="" id=""
										cols="30" rows="10"></textarea>
								</view>
							</view>
						</view>


					</view>

				</uni-popup-dialog>

			</uni-popup>
		</view>
	</view>




</template>

<script>
	import api from '../../utils/interface.js'

	export default {
		data() {
			return {
				value: 0,
				value1: 0,
				range: [],
				range1: [],
				rangeZ: [],
				rangeY: [],
				rangeX: [],
				X: 0,
				Y: 0,
				Z: "",
				userinfo: {},
				data: {},
				list: [],
				status: 0,
				currentImage: '',
				chukCurrentImage: '',
				url: '',
				item: {},
				dic: {
					sid: '',
					yid: '',
					fid: '',
					status: '',
					query: '',
					page: 1,
					size: 10,
					start_time: '',
					end_time: '',
					cstart_time: '',
					cend_time: '',
				},
				tempImages: [],
				searchValue: ''
			}
		},
		onLoad() {
			this.userinfo = uni.getStorageSync('data')
			this.data.uid = this.userinfo.id;
			this.data.sid = this.userinfo.sid;
			this.dic.sid = this.userinfo.sid;
			this.getData()
			this.getDeviceTypeList()
			this.getDeviceTypeListX()
			this.rangeZ = [{
				text: '全部',
				value: 0
			}, {
				text: '未出库',
				value: 1
			}, {
				text: '已出库',
				value: 2
			}]
		},
		onPullDownRefresh() {
			this.dic.page = 1;
			this.getData()
		},
		onReachBottom() {
			this.dic.page++;
			this.getData()

		},
		onShow() {
			this.getData()
		},
		methods: {
			saomaAction() {
				var that = this

				uni.scanCode({
					scanType: ['barCode'],
					success: function(res) {
						that.data.number = res.result;
						console.log(res);
					},
					fail: function(res) {
						uni.showToast({
							title: '扫描失败,请重试',
							icon: 'none'
						})
					}
				});
			},
			saomaAction1() {
				var that = this

				uni.scanCode({
					scanType: ['barCode'],
					success: function(res) {
						that.searchValue = res.result;
						that.dic.query = res.result;
						// that.dic.page = 1
						// that.getData()
						// console.log(res);

					},
					fail: function(res) {
						uni.showToast({
							title: '扫描失败,请重试',
							icon: 'none'
						})
					}
				});
			},
			fuzhiUrl() {
				uni.setClipboardData({
					data: this.url, // 设置要复制的文本内容
					success(res) {
						console.log("成功复制到剪贴板");
						uni.showToast({
							title: '成功复制到剪贴板'
						})
					},
					fail(err) {
						console.error("复制失败", err);
					}
				});
			},
			async orderExcelAction() {

				if (this.list.length == 0) {
					return uni.showToast({
						title: '列表不能为空',
						icon: 'none'
					})
				}

				const value = this.list.map(item => {
					return item.id
				}).join(',');


				uni.showLoading({
					title: "文档生成中..."
				})
				const config = {
					url: api.baseUrl + api.createDeviceExcel,
					method: 'post',
					data: {
						value
					}
				}
				const {
					data,
					code,
					msg
				} = await this.$http.request(config)
				uni.hideLoading()

				if (code == 1) {
					console.log(code, data);
					const url = api.imageBaseUrl + "/" + data.downurl
					this.url = url;
					console.log(url);
					uni.downloadFile({
						url,
						success: (res) => {
							let xlsFilePath = res.tempFilePath
							if (res.statusCode === 200) {
								uni.saveFile({
									tempFilePath: xlsFilePath,
									success: (res) => {
										console.log(res)
										//res.savedFilePath文件的保存路径
										//保存成功并打开文件
										uni.openDocument({
											filePath: res.savedFilePath,
											success: (res) => {
												console.log('成功打开文档')
											}

										})
									},
									fail: () => console.log('下载失败')
								})

								console.log('下载成功');
							}
						}
					});

				} else {
					uni.showToast({
						icon: "none",
						title: msg
					})
				}

			},
			async chukuAction() {

				const config = {
					url: api.baseUrl + api.chuku,
					method: 'post',
					data: this.item
				}
				const {
					data,
					code,
					msg
				} = await this.$http.request(config)
				console.log(code, data);
				if (code == 1) {
					uni.showToast({
						icon: "none",
						title: '出库成功'
					})
					this.dic.query = ''
					this.dic.page = 1
					this.getData()
				} else {
					uni.showToast({
						icon: "none",
						title: msg
					})
				}
			},
			chukuBtnAction(e) {
				const index = e.currentTarget.dataset.index
				const item = this.list[index];
				this.item = Object.assign({}, item)
				this.$refs.chukuInputDialog.open()
			},
			change1(e) {
				this.data.fid = this.range1[e].id
			},
			change(e) {
				this.data.yid = this.range[e].id
				const item = this.range[e];
				this.getDeviceXinghaoList(item)
			},
			changeZ(e) {
				console.log(e);
				this.Z = e;
				this.dic.status = e
				this.getData()
			},
			changeY(e) {
				this.Y = e;
				const item = this.rangeY[e];
				this.dic.fid = item.id;
				this.dic.query = ''
				this.dic.page = 1
				this.getData()
			},
			changeX(e) {
				this.X = e;
				const item = this.rangeX[e];
				this.dic.yid = item.id;
				this.getDeviceXinghaoListX(item)
				this.dic.query = ''
				this.dic.page = 1
				this.getData()
			},
			async getDeviceXinghaoListX(value) {

				const config = {
					url: api.baseUrl + api.getDeviceClassById,
					method: 'post',
					data: value
				}
				const {
					data,
					code,
					msg
				} = await this.$http.request(config)
				if (code == 1) {
					this.rangeY = data
					this.rangeY.splice(0, 0, {
						name: '全部'
					})

					for (var i = 0; i < this.rangeY.length; i++) {
						const item = this.rangeY[i];
						item.value = i;
						item.text = item.name
					}
				} else {
					uni.showToast({
						icon: "none",
						title: msg
					})
				}
			},
			async getDeviceXinghaoList(value) {

				const config = {
					url: api.baseUrl + api.getDeviceClassById,
					method: 'post',
					data: value
				}

				const {
					data,
					code,
					msg
				} = await this.$http.request(config)
				if (code == 1) {
					this.range1 = data
					for (var i = 0; i < this.range1.length; i++) {
						const item = this.range1[i];
						item.value = i;
						item.text = item.name
					}

					if (this.range1.length != 0) {
						this.data.fid = this.range1[0].id
					}
				} else {
					uni.showToast({
						icon: "none",
						title: msg
					})
				}
			},
			async getDeviceTypeListX() {

				const config = {
					url: api.baseUrl + api.getDevices,
					method: 'post',
					data: {}
				}
				const {
					data,
					code,
					msg
				} = await this.$http.request(config)
				if (code == 1) {
					this.rangeX = data
					this.X = 0;
					this.rangeX.splice(0, 0, {
						name: '全部'
					})
					for (var i = 0; i < this.rangeX.length; i++) {
						const item = this.rangeX[i];
						item.value = i;
						item.text = item.name
					}
					this.getDeviceXinghaoListX(this.rangeX[0])
				} else {
					uni.showToast({
						icon: "none",
						title: msg
					})
				}
			},
			async getDeviceTypeList() {

				const config = {
					url: api.baseUrl + api.getDevices,
					method: 'post',
					data: this.data
				}
				const {
					data,
					code,
					msg
				} = await this.$http.request(config)
				if (code == 1) {
					this.range = data
					this.value = 0;
					for (var i = 0; i < this.range.length; i++) {
						const item = this.range[i];
						item.value = i;
						item.text = item.name
					}

					this.getDeviceXinghaoList(this.range[0])
					this.data.yid = this.range[0].id
				} else {
					uni.showToast({
						icon: "none",
						title: msg
					})
				}
			},
			dialogClose() {},
			xiajiaBtnAction(e) {
				const index = e.currentTarget.dataset.index
				const item = this.list[index];
				this.item = Object.assign({}, item)
				this.$refs.xiajiaalertDialog.open()
			},

			async xiajiadialogConfirm() {
				const config = {
					url: api.baseUrl + api.updateDeviceXiajia,
					method: 'post',
					data: {
						id: this.item
					}
				}
				const {
					data,
					code,
					msg
				} = await this.$http.request(config)
				console.log(code, data);
				if (code == 1) {
					uni.showToast({
						icon: "none",
						title: '操作成功'
					})
					this.dic.query = ''
					this.dic.page = 1
					this.getData()
				} else {
					uni.showToast({
						icon: "none",
						title: msg
					})
				}
			},
			search(res) {
				this.dic.query = res.value
				this.dic.page = 1
				this.getData()
			},
			input(res) {
				this.dic.query = res
			},
			clear(res) {
				this.dic.query = ''
				this.dic.page = 1
				this.getData()
			},
			blur(res) {
				this.dic.query = res.value
				this.dic.page = 1
				this.getData()
			},
			focus(e) {

			},
			cancel(res) {
				this.dic.query = ''
				this.dic.page = 1
				this.getData()
			},
			chukuChooseImage() {
				this.$upload.chooseImage().then(res => {
					this.item.cimage = api.imageBaseUrl + "/" + res.image
					this.chukCurrentImage = res.showImage
				})
			},
			chooseImage() {

				this.$upload.chooseImage().then(res => {
					if (this.tempImages.length == 0) {
						this.tempImages = [api.imageBaseUrl + "/" + res.image]
					} else {
						this.tempImages.push(api.imageBaseUrl + "/" + res.image)
					}
					this.data.image = this.tempImages.join(',')
					console.log(this.data);
				})
			},
			shanchuImage(e) {
				console.log(e)
				const index = e.currentTarget.dataset.index
				this.tempImages.splice(index, 1)
				this.data.image = this.tempImages.join(',')
				console.log(this.data);
			},
			async dialogConfirm() {
				const item = this.item

				// if (item.use_type == true) {
				// 	return uni.showToast({
				// 		icon: "none",
				// 		title: '商品被使用,不可删除哟'
				// 	})
				// }

				const config = {
					url: api.baseUrl + api.deleteinventory,
					method: 'post',
					data: {
						id: item.id
					}
				}
				const {
					data,
					code,
					msg
				} = await this.$http.request(config)
				console.log(code, data);
				if (code == 1) {
					uni.showToast({
						icon: "none",
						title: '删除成功'
					})
					this.dic.query = ''
					this.dic.page = 1
					this.getData()
				} else {
					uni.showToast({
						icon: "none",
						title: msg
					})
				}
			},
			shaunchuBtnAction(e) {

				const index = e.currentTarget.dataset.index
				this.item = this.list[index];
				this.$refs.alertDialog.open()
			},
			seebigCImageAction(e) {
				uni.previewImage({
					urls: [e]
				})
			},
			seebigImageAction(e) {
				uni.previewImage({
					urls: [e]
				})
			},
			bianjiBtnAction(e) {
				this.status = 1;
				const index = e.currentTarget.dataset.index
				const item = this.list[index]
				this.data = Object.assign({}, item);
				this.data.yid = this.range[0].id
				if (this.range1.length != 0) {
					this.data.fid = this.range1[0].id
				}
				this.currentImage = ''
				this.value = 0;
				this.value1 = 0;
				if (this.data.image != '' && this.data.image != null) {
					this.data.images = this.data.image.split(',')
					this.tempImages = this.data.image.split(',')

				}
				this.$refs.inputDialog.open()
			},
			addStoreBtnAction() {

				this.data = {}
				this.data.uid = this.userinfo.id;
				this.data.sid = this.userinfo.sid;
				this.data.yid = this.range[0].id
				if (this.range1.length != 0) {
					this.data.fid = this.range1[0].id
				}
				this.currentImage = ''
				this.value = 0;
				this.value1 = 0;
				this.status = 0;
				this.tempImages = []
				this.data.images = []
				const item = this.range[0];
				this.getDeviceXinghaoList(item)
				this.$refs.inputDialog.open()
			},
			async getData() {
				console.log();
				const config = {
					url: api.baseUrl + api.getInventorys,
					method: 'post',
					data: this.dic
				}
				const {
					data,
					code,
					msg
				} = await this.$http.request(config)
				console.log(code, data);
				uni.stopPullDownRefresh()

				if (code == 1) {
					if (this.dic.page == 1) {
						this.list = []
						this.list = data
					} else {
						this.list = [...this.list, ...data]
					}
					this.list.map(item => {
						if (item.image != '' && item.image != null) {
							item.images = item.image.split(',')
						}

					})
				} else {
					uni.showToast({
						icon: "none",
						title: msg
					})
				}
			},
			async commitEditAciton() {

				const config = {
					url: api.baseUrl + api.changeKuDataAction,
					method: 'post',
					data: this.data
				}
				const {
					data,
					code,
					msg
				} = await this.$http.request(config)
				console.log(code, data);
				if (code == 1) {
					uni.showToast({
						icon: "none",
						title: '修改成功'
					})
					this.dic.query = ''
					this.dic.page = 1
					this.getData()

				} else {
					uni.showToast({
						icon: "none",
						title: msg
					})
				}
			},
			async commitAddAciton() {
				const config = {
					url: api.baseUrl + api.inventorysAdd,
					method: 'post',
					data: this.data
				}
				const {
					data,
					code,
					msg
				} = await this.$http.request(config)
				console.log(code, data);
				if (code == 1) {
					uni.showToast({
						icon: "none",
						title: '添加成功'
					})
					this.dic.query = ''
					this.dic.page = 1
					this.getData()

				} else {
					uni.showToast({
						icon: "none",
						title: msg
					})
				}
			},
			async buttonAction(e) {
				console.log(e);
				if (this.data.number == undefined) {
					return uni.showToast({
						icon: "none",
						title: '请输入设备串码'
					})
				}

				if (this.status == 0) {
					this.commitAddAciton()
				} else {
					this.commitEditAciton()
				}
			},
			maskClick(e) {
				console.log('maskClick事件:', e);
			},
			changeAction(e) {

				console.log('changeAction事件:', e);

				this.dic.start_time = e[0];
				this.dic.end_time = e[1];
				this.dic.page = 1

				this.getData()
			},
			changeAction1(e) {

				console.log('changeAction事件:', e);
				if(e.length == 0){
					this.dic.status = 0
				}else{
					this.dic.status = 2
				}
				this.dic.page = 1
				this.dic.cstart_time = e[0];
				this.dic.cend_time = e[1];

				this.getData()
			}
		}
	}
</script>

<style>
	page {
		background-color: #e5e5e5;
	}

	.item {
		margin: 20rpx 0;
		padding: 20rpx;
		background-color: white;
		border-radius: 12rpx;
	}

	.conent {
		height: calc(100vh - 240rpx);
	}

	.content {
		margin: 20rpx;
		font-size: 28rpx;
	}

	.element {
		white-space: nowrap;
		/* 不换行 */
		overflow: hidden;
		/* 隐藏超出部分 */
		text-overflow: ellipsis;
		/* 显示省略号 */
	}

	.title-left {
		border-left: 8rpx solid #007aff;
		padding: 0 20rpx;
		margin: 20rpx;
		font-weight: 700;
	}

	.box-border {
		border: 2rpx solid #e5e5e5;
		padding: 10rpx;
	}

	.example-body {
		background-color: #fff;
		padding: 10px;
	}
</style>